<template>
	<view class="my" style="font-size: 26rpx;">
		<!-- 头部 -->
		<view class="my-header">
			<view class="heder-main">
				<view class="header-config" @tap='goConfig'>
					<image class="config-img" src="../../static/img/config.png" mode=""></image>
				</view>
				<view class="header-logo">
					<image class="logo-img" :src="loginStatus ? userInfo.imgUr :'../../static/img/user.jpeg'" mode=""></image>
					<view class="logo-name">
						{{ loginStatus ? userInfo.nickName :"用户昵称"}}
					</view>
				</view>
			</view>
		</view>
		<!-- 我的订单 -->
		<view class="order">
			<view class="order-title" @tap="gotoMyOrder">
				<view >我的订单</view>
				<view>全部订单 ></view>
			</view>
			<view class="order-list">
				<view class="order-item">
					<image class="order-img" src="../../static/img/oder1.png" mode=""></image>
					<view>待付款</view>
				</view>
				<view class="order-item">
					<image class="order-img" src="../../static/img/order2.png" mode=""></image>
					<view>待付款</view>
				</view>
				<view class="order-item">
					<image class="order-img" src="../../static/img/order3.png" mode=""></image>
					<view>待付款</view>
				</view>
				<view class="order-item">
				 	<image class="order-img" src="../../static/img/order4.png" mode=""></image>
					<view>待付款</view>
				</view>
				<view class="order-item">
					<image class="order-img" src="../../static/img/order5.png" mode=""></image>
					<view>待付款</view>
				</view>
			</view>
		</view>
		<!-- 内容列表 -->
		<view class="my-content">
			<view class="my-content-item">
				<view>我的收藏</view>
				<view>></view>
			</view>
			<view class="my-content-item">
				<view>我的优惠券</view>
				<view>></view>
			</view>
			<view class="my-content-item">
				<view>我的积分</view>
				<view>></view>
			</view>
			<view class="my-content-item">
				<view>帮助中心</view>
				<view>></view>
			</view>
		</view>
		<Tabbar cureentPage = 'my'></Tabbar>
	</view>
</template>

<script>
	import {mapState} from 'vuex'
	import Tabbar from '@/components/common/Tabbar.vue'
	export default {
		data() {
			return {
				
			}
		},
		components:{
			Tabbar
		},
		computed:{
			...mapState({
				loginStatus:state =>state.user.loginStatus,
				userInfo:state=> state.user.userInfo,
				token:state=> state.user.token
			})
		},
		methods: {
			goConfig() {
				uni.navigateTo({
					url:'../my-config/my-config'
				})
			},
			gotoMyOrder() {
				uni.navigateTo({
					url:'../my-order/my-order'
				})
			}
		}
	}
</script>

<style scoped>
.my-header {
	/* background: url(../../static/img/tgy.jpeg) no-repeat;*/
	background-color: #00B7FF;
	width: 100%;
	height: 400rpx;
}
.heder-main{
	position: relative;
	align-items: center;
}
header-config {
	position: absolute;
	left: 40rpx;
}
.header-logo{
	position: absolute;
	left: 40%;
	margin-right: -60rpx;
	width: 120rpx;
	/* height: 120rpx; */
}
.config-img {
	width: 60rpx;
	height: 60rpx;
}
.logo-img{
	width: 120rpx;
	height: 120rpx;
	border: 2px solid #CCCCCC;
	border-radius: 50%;
	background-color: #FFFFFF;
}

.logo-name{
	color: #FFFFFF;
	font-size: 24rpx;
	font-weight: bold;
}

/* 订单区域的样式 */
.order-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20rpx 0;
}
.order-list {
	padding: 20rpx;
	display: flex;
}
.order-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.order-img {
	width: 66rpx;
	height: 66rpx;
}
/* 内容列表css*/
.my-content {
	margin: 20rpx 0;
	padding: 0 20rpx;
}
.my-content-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20rpx 0;
	border-bottom:2px solid #CCCCCC;
}
</style>
